package com.han.design;

/**
 * @author v-taohuang
 * @date 上午12:24 2020/2/24
 */
public class FactoryProducer {

    public static AbstractStrategyFactory getFactory(String className){

        if (className != null && !"".equals(className)) {
            try {
                return ( AbstractStrategyFactory ) Class.forName(className).newInstance();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return null;

    }

}
